package com.gae.blore.client.dialog;

import com.gae.blore.client.domain.Place;
import com.google.gwt.user.client.ui.FlexTable;
import com.google.gwt.user.client.ui.Grid;
import com.google.gwt.user.client.ui.HTML;
import com.google.gwt.user.client.ui.Label;

public class PlaceFiller {
	public static void fillPlace(Place place, FlexTable flexTable) {
		final Label nameLab = new Label("Name");
		final Label locLab = new Label("Address");
		final Label landmarkLab = new Label("Landmark");
		final HTML sep = new HTML(":");

		String nameVal = place.getName();
		String locVal = place.getAdd();
		String landmarkVal = place.getLand();

		final HTML nameValue = new HTML(nameVal);
		final HTML locText = new HTML(locVal);
		final HTML landmarkText = new HTML(landmarkVal);
		flexTable.setWidget(0, 0, nameLab);
		flexTable.setWidget(0, 1, sep);
		flexTable.setWidget(0, 2, nameValue);
		flexTable.setWidget(1, 0, locLab);
		flexTable.setWidget(1, 1, sep);
		flexTable.setWidget(1, 2, locText);
		flexTable.setWidget(2, 0, landmarkLab);
		flexTable.setWidget(2, 1, sep);
		flexTable.setWidget(2, 2, landmarkText);

	}

}
